package com.example.gs.mvpdemo.contract;

import android.support.annotation.NonNull;

import com.example.gs.mvpdemo.base.BaseModel;
import com.example.gs.mvpdemo.model.bean.LoginBean;
import com.example.gs.mvpdemo.view.IView;

import rx.Observer;

/**
 * Created by GaoSheng on 2016/11/26.
 * 18:28
 *
 * @VERSION V1.4
 * com.example.gs.mvpdemo.contract
 * 契约类,定义登录用到的一些接口方法
 */

public class LoginContract {

    public interface LoginView extends IView {
        String getUserName();

        String getPwd();

        void loginSuccess(String str);

        void loginFail(String failMsg);
    }


    public abstract static class LoginModel extends BaseModel{
        public abstract void login(@NonNull String username,
                                   @NonNull String pwd,
                                   @NonNull Observer<LoginBean> bserver);
    }

    public interface LoginPresenter {
        //登录方法
        void login(String name, String pwd);
    }
}
